Running Archival application with Docker

Docker Login:

Login to the container-registry.oracle.com to pull the required images using the below command:

# docker login container-registry.oracle.com

Username

Password

Login successful.

Use your Oracle SSO username and password to log in to the Oracle Registry.

Steps to build the image and run the container

  1. Go to the archival folder where docker file is present.

  2. Build the docker image using the below command

    docker build --network=host -t archival:1.0.0 .

    Docker Image

  3. Run the container using the below command

    The master password will be set as system property using docker run command through SECURE_CONFIG_AES_MASTER_PWD=myMasterPasswordForEncryption

    docker run -d --restart unless-stopped --network=host --privileged --mount type=bind,source=/scratch/oipa/archival/conf/,target=/usr/local/archival/conf --mount type=bind,source=/scratch/oipa/archival/logging.properties,target=/usr/local/archival/logging.properties -e SECURE_CONFIG_AES_MASTER_PWD=myMasterPasswordForEncryption --name archival archival:1.0.0

     

    Docker System Property

  4. Make sure the container started without any exception.

    To check the logs use

    docker logs -f archival.

    Liquibase files should run without any exceptions.

    Manual Deployment:

    Follow the below steps for deploying archival service manually (without docker).

    • Go to the archvial folder.

    • Run the below command.

    Windows → java -cp "archival.jar;libs/*" com.oracle.insurance.archival.cmd.ArchivalMain

    Linux → java -cp "archival.jar:libs/*" com.oracle.insurance.archival.cmd.ArchivalMain

    Make sure the archive and retrieval related tables and procedures created in source database:

    Tables: Archive Source

    ARCHIVE
    ARCHIVE_BATCH
    ARCHIVE_BATCH_ENTITYGUIDS
    ARCHIVE_ACTIVITY_DETAIL
    ARCHIVE_ERROR
    ARCHIVE_LOG
    TMP_ARCHIVE_ENTITY_ACTIVITY
    
    RETRIEVE
    RETRIEVE_ACTIVITY_DETAILS
    RETRIEVE_ENTITYGUIDS
    RETRIEVE_ERROR
    TMP_RETRIEVE_ENTITY_ACTIVITY

    Procedures: Archive Source

    SP_CREATE_ARCHIVE
    SP_POPULATE_ARCHIVE_METADATA
    
    SP_CREATE_RETRIEVE

    Make sure the Activity related tables created in Target database.

     

    Tables: Archive Target

    ASACTIVITY
    ASACCOUNTINGDETAILFIELD
    ASACTIVITYADDRESS
    ASACTIVITYALLOCATIONSET
    ASACTIVITYCHANGEREQUEST
    ASACTIVITYCOMMENTS
    ASACTIVITYFIELD
    ASACTIVITYMATH
    ASACTIVITYMULTIVALUEFIELD
    ASACTIVITYSEQUENCE
    ASACTIVITYSEQUENCEDETAIL
    ASACTIVITYSEQUENCETASK
    ASACTIVITYSEQUENCETRACE
    ASACTIVITYSPAWN
    ASACTIVITYSUSPENSE
    ASACTIVITYTASK
    ASBENEFITSPLIT
    ASDEPOSITVALUE
    ASFUNDVALUE
    ASPOLICYVALUE
    ASPOLICYVALUEFIELD
    ASACCOUNTINGDETAIL
    ASACCOUNTINGDETAILDISBURSEMENT
    ASACCOUNTINGDETAILEXCHANGE
    ASTRANSFERDETAIL
    ASVALUATIONXML

Testing

Use Post MAN or any other rest client to test the apis.

Get Request

Get Request